<?php
	include_once("Login.php");
	
	$conn = new mysqli($host,$user,$passwd, $database)
	or die("SQL connect error: ".mysqli_connect_error());
	
	$body = file_get_contents('php://input');
	$xml = simplexml_load_string($body);

	//$fromuser = $xml->fromuser;
	//$touser = $xml->touser;
	//$message = $xml->message
        
        $fromuser = "11";
        $touser = "12";
        $message = "Web Service Test";
        
	$query = "INSERT INTO Message (FromUserId, ToUserId, Message) VALUES ('$fromuser', '$touser', '$message')";
	
	mysqli_query($conn, $query);
	
	$id =  mysqli_insert_id($conn);
		
			echo "<node><insertId>$id</insertId></node>";
		
	mysqli_close($conn);
?>